<template>
  <el-menu default-active="2" class="el-menu-vertical-demo">
    <el-sub-menu index="1">
      <template #title>
        <span>通知管理</span>
      </template>
      <el-menu-item class="tao" index="1-1" @click="onalter"
        >通知列表</el-menu-item
      >
      <el-menu-item class="tao" index="1-2" @click="onalterType"
        >通知类型管理</el-menu-item
      >
    </el-sub-menu>
    <el-sub-menu index="2">
      <template #title>
        <span>学生请假</span>
      </template>
      <el-menu-item
        class="tao"
        index="2-1"
        @click="router.push('/index/family-schoolInteraction/StudentLeaveList')"
        >学生请假列表</el-menu-item
      >
      <el-menu-item
        class="tao"
        index="2-2"
        @click="
          router.push('/index/family-schoolInteraction/Studentleavereview')
        "
        >学生请假审核</el-menu-item
      >
      <el-menu-item
        class="tao"
        index="2-3"
        @click="router.push('/index/family-schoolInteraction/LeaveRecord')"
        >请假记录</el-menu-item
      >
      <el-menu-item
        class="tao"
        index="2-4"
        @click="router.push('/index/family-schoolInteraction/LeaveSettings')"
        >请假设置</el-menu-item
      >
    </el-sub-menu>
    <el-sub-menu index="3">
      <template #title>
        <span>相册管理</span>
      </template>
      <el-menu-item class="tao" index="3-1" @click="onimglist"
        >相册列表</el-menu-item
      >
      <el-menu-item class="tao" index="3-2" @click="auditlist"
        >审核列表</el-menu-item
      >
      <el-menu-item class="tao" index="3-3" @click="auditsettings"
        >审核设置</el-menu-item
      >
    </el-sub-menu>
    <el-sub-menu index="4">
      <template #title>
        <span>评价管理</span>
      </template>
      <el-menu-item class="tao" index="4-1" @click="onevaluate"
        >评价列表</el-menu-item
      >
      <el-menu-item class="tao" index="4-2" @click="onevaluateset"
        >评价权限设置</el-menu-item
      >
    </el-sub-menu>
    <el-menu-item index="5">
      <span @click="vote">投票管理</span>
    </el-menu-item>
    <el-menu-item
      index="6"
      @click="router.push('/index/family-schoolInteraction/healthcenter')"
    >
      <span>健康中心</span>
    </el-menu-item>
    <el-sub-menu index="7">
      <template #title>
        <span>出勤确认</span>
      </template>
      <el-menu-item
        class="tao"
        index="7-1"
        @click="$router.push('/index/family-schoolInteraction/duty')"
        >今日点名</el-menu-item
      >
      <el-menu-item
        class="tao"
        index="7-2"
        @click="$router.push('/index/family-schoolInteraction/dutytotal')"
        >出勤统计</el-menu-item
      >
    </el-sub-menu>
    <el-sub-menu index="8">
      <template #title>
        <span>设备报修</span>
      </template>
      <el-menu-item
        class="tao"
        index="7-1"
        @click="$router.push('/index/family-schoolInteraction/repair')"
        >设备报修列表</el-menu-item
      >
      <el-menu-item
        class="tao"
        index="7-2"
        @click="$router.push('/index/family-schoolInteraction/repairadd')"
        >新增设备报修</el-menu-item
      >
    </el-sub-menu>
  </el-menu>
</template>
  <script  setup>
import { useRouter } from "vue-router";
import { useRoute } from "vue-router";

var router = useRouter();
// 点击通知列表跳路由
var onalter = () => {
  router.push("/index/family-schoolInteraction/alertlist");
};
// 点击通知类型管理跳路由
var onalterType = () => {
  router.push("/index/family-schoolInteraction/alerttype");
};

var onevaluate = () => {
  router.push("/index/family-schoolInteraction/evaluatelist");
};

var onevaluateset = () => {
  router.push("/index/family-schoolInteraction/evaluateset");
};

// 相册列表
var onimglist = () => {
  router.push("/index/family-schoolInteraction/imglist");
};
// 相册审核列表
var auditlist = () => {
  router.push("/index/family-schoolInteraction/audit_list");
};
// 相册审核设置
var auditsettings = () => {
  router.push("/index/family-schoolInteraction/audit_set");
};
// 投票
var vote = () => {
  router.push("/index/family-schoolInteraction/vote");
};
</script>
  <style scoped>
element.style {
  padding-left: 20px;
}

.tao {
  margin-left: 0px;
}

.el-sub-menu .el-menu-item {
  padding: 0px;
  min-width: 160px;
}
</style>